package com.xiaoshuidi.cloud.module.iot.enums;

import cn.hutool.core.util.StrUtil;

/**
 * msgBizTypeEnum
 *
 * @author wael
 * @since 20230413
 */
public enum MsgBizTypeEnum {
    doorClearAndSendPwd("doorClearAndSend", "门锁密码清理及发送新密码", "passwordClearAndSendBizProcess");
    private String code;
    private String msg;
    private String beanName;

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public String getBeanName() {
        return beanName;
    }


    MsgBizTypeEnum(String code, String msg, String beanName) {
        this.code = code;
        this.msg = msg;
        this.beanName = beanName;
    }

    public static MsgBizTypeEnum getInstance(String code) {
        if (StrUtil.isEmpty(code)) {
            return null;
        }
        for (MsgBizTypeEnum instance : values()) {
            if (instance.getCode().equals(code)) {
                return instance;
            }
        }
        return null;
    }
}
